/*
 * @Description: 
 * @Author: Zhang Zhangda
 * @Date: 2021-03-04 20:44:18
 * @LastEditTime: 2021-03-09 08:59:19
 * @LastEditors: Zhang Zhaoda
 */
import {request} from "umi"
import {addtype,addQuestionsInter,search} from "@/interface/excal.interface"


//获取所有试题分类
export const getQuestionType=()=>{
  return request('/exam/getQuestionsType',{method:'GET'})
} 
//添加类型接口
export const addType=(params:addtype)=>{
  return request('/exam/insertQuestionsType',{method:'get',params})
}

//查看试题
export const whatchAllQuestion=()=>{
  return request('/exam/questions/new',{method:'get'})
}



//添加试题页面

//获取所有考试类型
export const getAllQuestionsType=()=>{
  return request('/exam/examType',{method:'get'})
}
//获取所有课程
export const getSubject=()=>{
  return request('/exam/subject',{method:'get'})
}


//添加试题接口
export const addQuestion=(data:addQuestionsInter)=>{
  return request('/exam/questions',{method:'post',data})
}

//更新试题
export const upDateQuestion=(data:addQuestionsInter)=>{
  return request('/exam/questions/update',{method:'post',data})
}


//按条件查询
export const serarchByCondition=(params:search)=>{
  return request('/exam/questions/condition',{method:'get',params})
}